<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Command line usage recommendations</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="Boost.Test">
<link rel="up" href="../practical_usage_recommendations.html" title="Practical usage recommendations">
<link rel="prev" href="ide_usage_recommendations.html" title="IDE usage recommendations">
<link rel="next" href="tutorials.html" title="Tutorials">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="ide_usage_recommendations.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../practical_usage_recommendations.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="tutorials.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_test.practical_usage_recommendations.command_line_usage_recommendatio"></a><a class="link" href="command_line_usage_recommendatio.html" title="Command line usage recommendations">Command
      line usage recommendations</a>
</h3></div></div></div>
<h5>
<a name="boost_test.practical_usage_recommendations.command_line_usage_recommendatio.h0"></a>
        <span class="phrase"><a name="boost_test.practical_usage_recommendations.command_line_usage_recommendatio.if_you_got_fatal_exception_somew"></a></span><a class="link" href="command_line_usage_recommendatio.html#boost_test.practical_usage_recommendations.command_line_usage_recommendatio.if_you_got_fatal_exception_somew">If
        you got fatal exception somewhere within test case, make program generate
        core-dump by adding extra command line argument</a>
      </h5>
<p>
        If you got "memory access violation" message (or any other message
        indication fatal or system error) when you run you test, to get more information
        about the error location add
      </p>
<pre class="programlisting">--<a class="link" href="../utf_reference/rt_param_reference/catch_system.html" title="catch_system_errors">catch_system_error</a>=no
</pre>
<p>
        to the test run command line. Now run the test again and it will create a
        core-dump you could analyze using you preferable debugger. Or run it under
        debugger in a first place and it will break at the point of failure.
      </p>
<h5>
<a name="boost_test.practical_usage_recommendations.command_line_usage_recommendatio.h1"></a>
        <span class="phrase"><a name="boost_test.practical_usage_recommendations.command_line_usage_recommendatio.how_to_use_test_module_build_wit"></a></span><a class="link" href="command_line_usage_recommendatio.html#boost_test.practical_usage_recommendations.command_line_usage_recommendatio.how_to_use_test_module_build_wit">How
        to use test module build with Boost.Test framework under management of automated
        regression test facilities?</a>
      </h5>
<p>
        My first recommendation is to make sure that the test framework catches all
        fatal errors by adding argument
      </p>
<pre class="programlisting">--<a class="link" href="../utf_reference/rt_param_reference/catch_system.html" title="catch_system_errors">catch_system_error</a>=yes
</pre>
<p>
        to all test modules invocations. Otherwise test program may produce unwanted
        dialogs (depends on compiler and OS) that will halt you regression tests
        run. The second recommendation is to suppress result report output by adding
      </p>
<pre class="programlisting">--<a class="link" href="../utf_reference/rt_param_reference/report_level.html" title="report_level">report_level</a>=no
</pre>
<p>
        argument and test log output by adding
      </p>
<pre class="programlisting">--<a class="link" href="../utf_reference/rt_param_reference/log_level.html" title="log_level">log_level</a>=nothing
</pre>
<p>
        argument, so that test module won't produce undesirable output no one is
        going to look at anyway. We recommend relying only on result code that will
        be consistent for all test programs. An alternative to my second recommendation
        is direct both log and report to separate file you could analyze later on.
        Moreover you can make Boost.Test to produce them in XML or JUNIT format using
      </p>
<pre class="programlisting">--<a class="link" href="../utf_reference/rt_param_reference/output_format.html" title="output_format">output_format</a>=XML
</pre>
<p>
        or
      </p>
<pre class="programlisting">--<a class="link" href="../utf_reference/rt_param_reference/log_format.html" title="log_format">log_format</a>=JUNIT
</pre>
<p>
        and use some automated tool that will format this information as you like.
      </p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2001-2020 Boost.Test contributors<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="ide_usage_recommendations.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../practical_usage_recommendations.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="tutorials.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
